repl: fix /dev/null history file regression#12762
Conversation
There was a problem hiding this comment.
This test case passes on Windows?
There was a problem hiding this comment.
Yes, because like the test case before it, it will just act like an empty file on other platforms.
There was a problem hiding this comment.
Wait, you can't just set this to /dev/null?
There was a problem hiding this comment.
No, because I believe Windows would then fail since /dev/null does not exists there and currently there is no way to conditionally skip a test from running, you can only make it fall back to the empty history file scenario.
025b12c to
24326a0
Compare
|
I've made a slight tweak to the test so that it creates the symlink in a more appropriate place now (the temp dir. instead of fixtures). CI once again: https://ci.nodejs.org/job/node-test-pull-request/7791/ |
jasnell
left a comment
There was a problem hiding this comment.
Ugh. Ok. Thanks for including the test.
This fixes a regression from 83887f3 where ftruncate() fails on a file symlinked to /dev/null. PR-URL: nodejs#12762 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
24326a0 to
c20e87a
Compare
This fixes a regression from 83887f3 where ftruncate() fails on a file symlinked to /dev/null. PR-URL: nodejs#12762 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
I just noticed that the problematic commit made its way into v7.x without this fix :-(, so I've updated the tags accordingly to match that of the PR for that commit. |
This fixes a regression from 83887f3 where ftruncate() fails on a file symlinked to /dev/null. PR-URL: #12762 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This fixes a regression from 83887f3 where ftruncate() fails on a file symlinked to /dev/null. PR-URL: #12762 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This fixes a regression from 83887f3 where ftruncate() fails on a file symlinked to /dev/null. PR-URL: #12762 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This fixes a regression from bb041ea where
ftruncate()fails on a file symlinked to /dev/null./cc @bzoz @jasnell
CI: https://ci.nodejs.org/job/node-test-pull-request/7761/
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)